using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using HTMapLib.Classes;
using MapControl;
using MapControl.Misc;
using MapControl.Misc.DAL;

namespace GPSMap
{
    public partial class frmGPSInfo_Testing : Form
    {
        public frmGPSInfo_Testing(frmGPSTracking_Testing frm)
        {
            InitializeComponent();
            formMain = frm;
        }

        public void ShowInfo(BaseGPSPoint gpsPoint)
        {
            GPSData objGPSData = gpsPoint.objGPSData;
            txtName.Text = objGPSData.Name;
            txtLon.Text = HTCollectionHelper.DecimalToDMS(objGPSData.LonGPS);
            txtLat.Text = HTCollectionHelper.DecimalToDMS(objGPSData.LatGPS);
            txtAlt.Text = objGPSData.Alt.ToString();
            txtSpeed.Text = objGPSData.Speed.ToString();
            txtAngle.Text = objGPSData.Angle.ToString();
            txtTime.Text = objGPSData.Time.ToString("HH:mm:ss");
            txtSatNum.Text = objGPSData.SatNum.ToString();
        }

        private void frmGPSInfo_Load(object sender, EventArgs e)
        {

        }

        private frmGPSTracking_Testing formMain;
        private void frmGPSInfo_FormClosing(object sender, FormClosingEventArgs e)
        {
            formMain.ShowGPSInfo(false);
        }
    }
}